1. Field of the Invention
The present invention relates to an optical encoder having an electrical division circuit for use in an encoder used for a displacement measurement or an angle measurement.
2. Related Background Art
A photoelectronic encoder is basically constructed by including a main scale having a first optical grating formed thereon, an index scale having a second optical grating formed thereon and arranged so as to face the main scale, a light source for irradiating the main scale with light, and a photoelectric receiving element for receiving light which has been transmitted or reflected by the optical grating of the main scale to be transmitted through the optical grating of the index scale. A system using an array of photoelectric receiving elements doubling as an index scale in a photoelectronic encoder of this sort has already been proposed, and an example thereof is shown in FIG. 10.
A conventional optical encoder shown in FIG. 10 is such that a plurality of photoelectric receiving elements are directly formed on an index scale 10 so as for their pitch to match the pitch of an optical grating 3 of a main scale 1. That is to say, after formation of an oxide film 12 on an n type semiconductor substrate 11, the oxide film 12 is selectively removed away so as for its pitch to match the pitch of the optical grating 3, and then a p type impurity is diffused into the n type semiconductor substrate 11 with the oxide film 12 as a mask to thereby form a p type semiconductor layer 13. As a result, a photodiode is formed in the form of a pn junction between the n type semiconductor substrate 11 and the p type semiconductor layer 13. Then, a transparent current collecting layer 14 is formed over the entire surface of the n type semiconductor substrate 11 to thereby form the index scale 10.
In accordance with the conventional optical encoder, since the light emitted from the light source 5 only passes through one optical grating, the photoelectric receiving efficiency is enhanced, and the influence of noises due to the diffracted light is excluded. In addition, since the index scale 10 itself constitutes the photoelectric receiving element, the device can be miniaturized.
FIG. 7 shows the relationship between an example of a pattern of the photodiode array used in the above-mentioned encoder and a light and darkness pattern of detected light. In FIG. 7, photodiode groups A and B are arranged with the positional relationship in which they are 0° and 90° out of phase with the light and darkness pattern of the light, and photoelectric currents generated therein are inputted to an I-V conversion circuit (not shown).
The photoelectric currents generated with such a construction, at the time when the light and darkness pattern of the light crosses the diode groups, are converted into voltages in the I-V conversion circuit so that analog sine voltage signals which are 0° and 90° out of phase with the light and darkness pattern of the light are obtained.
FIG. 8 shows an example of a conventional resistive division circuit which is capable of dividing the pitch of a primary signal into sixteen parts.
In FIG. 8, reference numeral 20A designates a buffer amplifier for an A sin θ signal; reference numeral 20B designates a buffer amplifier for an A cos θ signal; reference numeral 22 designates an inversion amplifier for applying an −A sin θ signal obtained by inverting an output signal of the buffer amplifier 20A to a node of a resistor array 16; reference numerals 24A to 24H designate eight comparators which are provided in correspondence to nodes of the resistor array 16, respectively; reference numeral 26 designates a reference voltage setting unit for supplying a reference voltage Vr for comparison to each of the comparators; reference numerals 28A to 28F designate exclusive OR gates for composing logically output signals of the comparators 24A to 24H; reference numeral 30, a direction discriminate circuit; and 32, an oscillator.
Since in this resistive division circuit 15, resistance values of resistors R1, R2, R3 and R4 are set so as to meet the ratio of 1:0.707:0.707:1 and also 180° are divided into eight parts, in the case of 360°, sixteen division can be made.
By the way, since this resistive division circuit is disclosed in detail in Swiss Patent No. 407,569, the detailed description thereof is omitted here for the sake of simplicity.
The light and darkness pattern of the light obtained in the photoelectric receiving element group in such a manner allows the pulse signals having a higher resolution than that optically obtained to be obtained through the I-V conversion amplifier and the electrical division circuit. Hence, positional and rotational information having a high accuracy is obtained.
FIG. 9 shows the relationship between an input signal and an output signal of the comparator 24A of the above-mentioned resistive division circuit shown in FIG. 8.
In the figure, reference symbol Va designates an input signal to an inverting input of the comparator 24A, and reference symbol Vr designates an input signal to a non-inverting input of the comparator 24A. In this case, the level of the input signal Vr is set to 0 V.
Normally, each of these comparators has a hysteresis as a measure of coping with the chattering due to noises.
For this reason, the output signal is not switched with its polarity at zero cross, but has a certain voltage (0.1 V for the amplitude of 1 V in FIG. 9) hysteresis. Since if the rotational direction of the encoder is fixed, a quantity of shift due to the hysteresis is uniform, this seems to have no problem. However, in the resistive division circuit shown in FIG. 8, the magnitude of the input voltage of the camparator 24C is 1/√{square root over (2)} of that of the input voltage to the comparator 24A, and hence if the same hysteresis voltage is set, then a quantity of shift will vary. In addition, if the rotational direction is changed, then as shown in FIG. 9, the polarity of the input signal Va is not changed at the position of the ideal zero cross, but is switched at a certain voltage. Here, since each of the comparators has the hysteresis, the position where the magnitude of the pulse is switched is shifted for the hysteresis.
A comparator adapted to detect a signal level is thus allowed to have a hysteresis so as to avoid the influence of signal noises generated on the input side of an electrical division circuit when an analog output signal from such an encoder head as shown in the prior art example is electrically divided by utilizing the resistive division method, to thereby suppress the generation of the chattering or the like.
However, there is encountered a problem in that since if the comparator is made to have the hysteresis, then the polarity of a pulse is switched at the position different from the position of the actual zero cross, the proper position can not be detected. In addition, there is encountered another problem in that since the switching point of a pulse when the direction is inverted as shown in FIG. 9 is largely changed due to the influence of the hysteresis, which results in a large error in the position where the direction inversion is repeated as right before the stop or the like.